#include <iostream>
#include <algorithm>
#include <vector>

int main()
{
	std::vector<int> v{1, 2, 3, 4, 5, 6, 7};
	for (int i = 1; i < (int)v.size(); i++)
		v[i-1] = std::move(v[i]);
	std::cout << v.size() << '\n';
	for (auto i : v)
		std::cout << i << ' ';
}

